package com.techsoul.module.accounting.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.techsoul.common.core.pojo.vo.UserVo;
import com.techsoul.module.accounting.pojo.param.AccApSkuMonthlySettlementSaveParam;
import com.techsoul.module.accounting.pojo.param.AccApSkuMonthlySettlementSearchParam;
import com.techsoul.module.accounting.pojo.param.AccountingApSearchParam;
import com.techsoul.module.accounting.pojo.vo.AccApSkuMonthlySettlementViewVo;
import com.techsoul.module.accounting.pojo.vo.AccApSkuMonthlySettlementVo;
import com.techsoul.module.accounting.pojo.vo.AccountingApVo;
import com.techsoul.module.order.pojo.param.SalesOrderItemSearchParam;
import com.techsoul.module.order.pojo.vo.SalesOrderItemVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 财务月度sku汇总 Service接口
 * 
 * @author liuen
 * @date 2021-06-01
 */
public interface IAccApSkuMonthlySettlementService {

    /**
     * 新增
     * @param params
     * @return
     */
    void insert(AccApSkuMonthlySettlementSearchParam params);

    /**
     * 异步新增
     * @param params
     * @return
     */
    void asyncInsert(AccApSkuMonthlySettlementSearchParam params, UserVo user);
    String deleteFromOldAddToHistory(Integer month,Integer year,AccApSkuMonthlySettlementSearchParam params, UserVo user) ;

    /**
     * 删除
     * @param id
     * @return
     */
    Integer delete(String id);

    /**
     * 批量删除
     * @param idList
     */
    Integer batchDelete(List<String> idList);

    /**
     * 修改
     * @param params
     * @return
     */
    Integer update(AccApSkuMonthlySettlementSaveParam params);

    /**
     * 详情
     * @param id
     * @return
     */
    AccApSkuMonthlySettlementVo findById(String id);

    /**
     * 列表
     * @param params
     * @return
     */
    List<AccApSkuMonthlySettlementVo> findAll(AccApSkuMonthlySettlementSearchParam params);

    /**
     * 列表-分页
     * @param params
     * @param current
     * @param pageSize
     * @return
     */
    IPage<AccApSkuMonthlySettlementVo> findAll(AccApSkuMonthlySettlementSearchParam params, Integer current, Integer pageSize);

    String exportData(AccApSkuMonthlySettlementSearchParam params);

    String generateMonthlySum(Integer month,Integer year,AccApSkuMonthlySettlementSearchParam params, UserVo user);
    IPage<AccApSkuMonthlySettlementViewVo> brandRateView(AccApSkuMonthlySettlementSearchParam params, Integer current, Integer pageSize);
    IPage<AccApSkuMonthlySettlementViewVo> supplierRateView(AccApSkuMonthlySettlementSearchParam params, Integer current, Integer pageSize) ;
    IPage<AccApSkuMonthlySettlementViewVo> storeRateView(AccApSkuMonthlySettlementSearchParam params) ;
    IPage<AccApSkuMonthlySettlementViewVo> spuRateView(AccApSkuMonthlySettlementSearchParam params, Integer current, Integer pageSize);


    /**
     * 单品销售排行列表-分页
     * @param params
     * @param current
     * @param pageSize
     * @return
     */
    IPage<AccApSkuMonthlySettlementViewVo> skuRateView(AccApSkuMonthlySettlementSearchParam params, Integer current, Integer pageSize);

    /**
     * 单品销售分析列表-分页
     * @param params
     * @param current
     * @param pageSize
     * @return
     */
    IPage<AccApSkuMonthlySettlementViewVo> skuSpuRateReport(AccApSkuMonthlySettlementSearchParam params, Integer current, Integer pageSize);


    /**
     * 获得地区销售额
     *
     * @return
     */
    AccApSkuMonthlySettlementViewVo countTotalSale(AccApSkuMonthlySettlementSearchParam site);

    /**
     * 获得地区采购额
     *
     * @return
     */
    AccApSkuMonthlySettlementViewVo countTotalPurchase(AccApSkuMonthlySettlementSearchParam site);
    Map<String, Object> countMonthlyLineChart(AccApSkuMonthlySettlementSearchParam params);
    List<AccApSkuMonthlySettlementViewVo> reportSum(AccApSkuMonthlySettlementSearchParam accountingApSearchParam);
    String generateMonthlySumData(String site, Integer month, Integer year, UserVo user,AccApSkuMonthlySettlementSearchParam params);

}
